Introduction: Digidraw is a general purpose drawing tool designed to oper-
ate on an IBM P C with the color graphics display adapter in
the high resolution mode (640 x 200). The program is provided in unprotected
basic and thus runs under the advanced basic interpreter (basica). Digidraw
will run under all versions of DOS and requires only 1 disk drive, single
or double sided. With Digidraw you can create, store, change any picture
or image which can be drawn in the IBM high resolution graphics mode.
Routine shapes such as boxes, circles, ellispses, arcs, etc. can be easily
drawn with two or three keystrokes any place on the screen. The various
functions provided by Digidraw are controlled by the ten (F1 thru F10) keys
on the left side of the IBM keyboard. The status of these keys is shown
during program execution on the 25th line of the display.
Operation: The key to using Digidraw involves the simulation of the same
procedures used for making a drawing without a computer. You
use a pencil and a piece of paper. The pencil would have a writing point
at one end and an eraser at the other end. In the course of creating your
drawing you would be moving the pencil over the paper with either the point
down on the paper or up from the paper to move to a new position. If a mistake
is made you would turn the pencil over to place the eraser down on the paper
to remove the unwanted lines or figures. With Digidraw you to do the same.
using the computer. The paper becomes the screen of your computer display and
the pencil position is represented by a single flashing dot (pixel) on the
screen. The movement of this dot and whether or not it draws or erases or just
moves without drawing or erasing is controlled by the following keys.
KEY FUNCTION PROVIDED
----- ---------------------
F1 Places the pencil up from the paper or down on the
paper.
F2 Selects which end of the pencil (point or erasure)
is in your fingers. In other words, is your intent
to draw something or to erase something?
F3 Determines the magnitude of the pencil movement
when you command the pencil (flashing dot) to
move. The provided magnitudes range from 1 to 25
screen pixels.
To actually move the pencil position eight of the nine numeric keypad keys
are used. These are the keys on the right side of the keyboard grouped in
three rows of three with the numbers 1 thru 9 on them. Notice four of the
keys also have arrows on them. The keys marked with arrows will move the
pencil in the direction of the arrow. Just how far the key will move the
pencil is determined by the F3 key as mentioned. In addition to moving the
pencil up, down, right and left, you can also move the pencil in a diagonal
direction by using the Home, PgUp, PgDn, and End keys. These keys provide
the following diagonal movements:
-1-
KEY MOVEMENT
------- ------------------
Home Up-Left diagonal
PgUp Up-Right diagonal
PgDn Down-Right diagonal
End Down-Left diagonal
Since these keys do not have arrows on them, the best way to remember their
movement is to associate them with the keys which do have arrows. For example
the Home key is next to both the up-arrow and left-arrow key, therefore, the
Home key is easily remembered for combining both the up and left movements.
Let's run the program now and see how the pencil moves, draws and erases.
To run the program type BASICA DIGIDRAW
After the logo is displayed, hit the RETURN key. After the announcement is
displayed hit the RETURN key again. You should now see a single flashing dot
in the center of the screen and the function key status on the bottom line.
Upon starting Digidraw, the status of your pencil will be: Pen Up, Point
and pm= 2 . This means the pencil is above the paper, you've got the point
in your fingers and your pencil movement magnitude is equal to 2 pixels at
a time. Press the F1 key and notice that the pencil status of Pen UP changes
to Pen Dn. Press F1 again and you go back to Pen Up. The F1 key thus toggles
or alternates the pen up and down function. Now press the F2 key. Notice that
the Point status changed to Erase. In essense you just turned the pencil over
in your hand so that the erasure is now aimed at the paper. Hit the F2 key
again and you're back to Point again. Thus F2 toggles the point erase function
Next press the F3 key. Notice that the pencil movement now equals 3. Press
again and pm=4. This will continue until you get to 25 at which point pm
will roll over to 1. It is not neccessary to push the F3 key once each time
to advance the pencil movement value, simply hold the F3 key down and the pm
value will advance at a rapid rate. Unless your reactions are extremely quick
however, it will be neccessary to release the F3 key when you get close to the
desired value of pm and come up on it one press at a time. When pm= 23 the
computer will beep at you warning that a roll over 25 and back to 1 is about
to take place. This is helpful when you desire a pm=1 value because you can
just listen for the beep and quickly release the F3 key when you hear it. At
this point pm will equal 24, 25, or 1 depending on your hand-ear co-ordination
At this point let's move the pencil around. Using the F1,F2, and F3 keys
select Pen Up, Point, and pm=10. Now press the up arrow key and notice the
movement of the pencil (flashing dot). Now press the F1 key and put the
Pen Dn. Now hit the up arrow key and observe that you have just drawn a line
10 pixels high. Now press the F2 key to get the Erase function and press
the down arrow key. You have just erased the line drawn in the last sequence.
Go ahead and experiment with the F1,F2, and F3 keys and the eight movement
direction keys until you feel comfortable with their usage. If the pencil is
moved to a screen boundry, and another move in the same direction is given
the move will simply be ignored.
-2-
FUNCTION KEYS F4 thru F10
The F4 thru F10 function keys provide various routine shapes, storage and
recall functions to the program. One important concept to note here is the
effect of the Point Erase function (F2) on keys F4 thru F10. The rule is
any image or shape reqested to be drawn will be infuenced by the status of
the Point Erase function. When Point is enabled, any figure or shape drawn
or recalled will be placed on the screen. When Erase is enabled, any figure
or shape drawn or recalled will be erased, assuming there is something there
to erase. Therefore, if a shape is incorrectly drawn or placed on the screen,
it may be removed by duplicating the drawing function with the Erase function
enabled.
Keys F4 thru F8 each provide 2 different functions to the user. Key F10 is
the toggle or switcher for these functions. Notice that when the program is
running that the functions displayed on the screen bottom will change when
F10 is pressed. When the program is started, the first set of functions are
enabled and displayed for keys F4-F8 and a One is shown for key F10. If key
F10 is pressed, the functions displayed for keys F4-F8 will all change and now
a Two will show in the F10 position on the display. If F10 is pressed again
the display at the bottom will dissappear. This is used if a hardcopy of the
screen is desired to eliminate the function key display from showing up on the
copy. Even though the key display is off, the keys will still function and if
you had memorized their states before the display was turned off you could
use them without the display. But why bother? Simply press F10 again and the
function key display will be on again and back to its original state. In
conclusion then F10 provides 3 services:
1. 1st functions for keys F4-F8
2. 2nd functions for keys F4-F8
3. KEY DISPLAY OFF, but still in 2nd functions
Now let's discuss these functions.
F4 key : This key gives you a line or a box drawing capability.
To draw a line make sure Line is showing on the display line.
Position the pencil at one end of where you want your line and
hit the F4 key. Move the pencil to the other end of the line and hit the
F4 key again. If Point (F1) was enabled you should now have a line on the
screen.
To draw a box, press F10 until Box is showing on the display line.
Move the pencil to where you desire a corner of the box to be. Hit the F4
key. Now move the pencil to the OPPOSITE corner, not any other corner, it
must be the opposite corner, of the box. Hit the F4 key again and the box
will appear.
-3-
F5 key : This key gives you a triangle or arc drawing capability.
To draw a triangle make sure Triang is showing on the display
line. Move the pencil to the 1st vertex of the desired
triangle and press F5. Move the pencil to the 2nd vertex of the triangle
and press F5. Move the pencil to the last vertex of the triangle and press
F5 once more. The triangle will now appear.
To draw an arc, press F10 until Arc is showing on the display line.
Since an arc is just an incomplete circle you will need to choose a
center and radius for the arc. Position the pencil to the desired center
of the arc and then press F5. Move the pencil next to the radius of the
arc and then press the F5 key again. The display at the bottom of the
screen will be replaced by the message " Hold space bar to draw arc ".
Simply hold the space bar down and you will see the arc begin to draw
on the screen. Since only you know how far you want the arc to go you
will have release the space bar when enough has been drawn. If you held
the space bar long enough, eventually a circle would be drawn. Note that
the arc was drawn in a counter-clockwise direction from where you made
your radius selection. If you wind up drawing more arc than you wanted,
don't panic, a solution is provided. At the beginning of these instructions
we stated that the Point Erase key (F2) would influence all drawing commands
Now even though the key display line is not showing on the screen and the
message " Hold space bar to draw arc " has taken its place, we can still
enable the Erase function by pressing F2. Now if we hold the space bar the
arc will start to erase in a clockwise direction. You can alternate between
these two modes until you have drawn the desired arc, then hit the return key
to resume the program.
F6 key: This key will provide circle and ellipse drawing capability.
To draw a circle, make sure Circle is showing on the display line.
Move the pencil to the center of the circle and press the F6 key.
Next move the pencil to any point on the circumference of the desired
circle and press the F6 key again. The circle will be drawn.
To draw an ellipse, press F10 until the term Elipse appears on the display
line. Since an ellipse has two radii, (major and minor) it will be neccessary
to input 3 points to the ellipse function: center,radius #1, and radius #2.
It doesn't matter to the program which radius is larger, the only require-
ment is that the radius be input by pure vertical and horizontal movements
only. It is often helpful to mark the ellipse center to aid in describing
the radii. This can easily be done by moving the pencil to the desired center
of the ellipse and pressing the F4 key twice. The astute reader will see that
this action just requested a box be drawn with opposite corners equal to each
other. This results in a single dot on the screen being drawn which will mark
for us our ellipse center. Now don't move the pencil until you have pressed
the F6 key once to tell the ellipse function that this is our ellipse center.
Now move the pencil in either an up-down or left-right motion until you have
moved to the first radii position. Press the F6 key again. Move back to the
center of the desired ellipse and then move out at a right angle to the first
radius until you reach the position of the second radius. Press F6 again and
the ellipse will be drawn.
-4-
F7 key The F7 function key is used to paint or fill in figures with
either white or black. To paint a shape, simply move the pencil
any place inside the shape and press the F7 key. Whether you
paint white or black depends on the color shown on the display
line. Press F10 until you get the desired paint. One note of caution is
in order here. To successfully paint an object, the object boundry must
be the same color as the paint selected and the boundry must be continuous.
If the paint finds a way out of the object thru a hole in the boundry it
will wind up painting the whole screen. This could ruin alot of work in
building a complex picture. Try this example. With Point selected (F2)
use F6 and draw a fairly large circle in the center of the screen. Next,
move the pencil any where inside the circle and press the F7 key to paint
the entire circle white. Now press F2 to enable Erase and draw a second
smaller circle inside the first one. What you should now see is a large
all white disk with a black circle inside it. Now press F10 to change the
paint status to black, move the pencil inside the smaller of the two circles
and press the F7 key. You now have sort of a big o or ring shape on the
screen. Try the same thing over again, but skip the step where you erased
the smaller circle out of the larger one.
F8 & F9 keys The F8 and F9 keys are used together to store and recall
entire screens, or just images which represent small portions
of the screen. The F8 key does all the work of actually
storing or recalling screens or images. You press the F10 key to change the
status of the F8 key from a store to recall function. The status of F8 key
is displayed on the bottom line so you know which function is enabled.
The F9 key only selects the type of store or recall to be done. The F9 key
has 3 possible states: Memory, Disk, and Screen. To change between these
states just press F9 until the desired state appears on the display line.
Since the F8 key initiates a store or recall, the F9 key determines from
where the store or recall will come . If Memory is selected, the store
or recall comes from memory. Obviously to recall an image from memory, one
must first be stored there. Usually you will store and recall images to memory
when you are making a drawing and you need to duplicate an image or shape
several times and you don't want to redraw it every time. A store or recall
from disk will be for the same reason except now the image is probably a
frequently used one and is therefore stored on disk for recall at any time.
Since there is only 1 buffer for memory and disk images, once an image is
recalled from disk, you can duplicate it by changing to Memory (F9) after
the first recall is done. This will save you the trouble of entering the
file name every time you need it. The Screen save and recall work in the same
way except that an entire screen will be saved or recalled when this state
is enabled. When a screen recall is made any information on the screen before
the recall will be lost. Remember to turn off the display line before you
save the entire screen.
-5-
How do we tell the store and recall function where the image is that we want
to store or recall? Well it works just like the Box function described above.To store an image on disk or in memory, place the pencil at one corner of an
imaginary box that just surrounds the image and press F8. Now move the pencil
to the opposite corner of the box and press the F8 key again. If the Disk
state was enabled, you will now have to enter a disk file name. If the Memory
state was enabled, the image will now be in memory. When storing a Screen, it
doesn't matter where the pencil is, the entire screen is going to be stored
anyway.
To recall an image, first move the pencil to the area of the screen where you
wish the recall to take place noting that when the recall does take place, the
present pencil postion will be the upper left hand corner of the imaginary
box that we stored it in. Once again the status of the F2 key (Point or Erase)
will determine if the image is drawn or erased. So if an image is recalled
and drawn in an incorrect position on the screen, simply recall the image
again at the exact same location with the Erase function on and the image will
disappear.
An error will result if an image recall is attempted that would put one of
the four corners of the imaginary box the image was stored in off the display
screen. In other words, a partial recall of an image is not allowed.
Try the following example: Move the pencil to the approximate center of the
screen. Clear the screen if neccessary by holding the ALT key down and pressing
the E key. Next draw a small circle using the F6 key. You may paint the
inside of the circle if you want or place some other design inside it to
further complicate its image. Now we will store this circle and its contents
in memory. Press the F10 key until the word "Store" is showing for key F8 on
the display line. Press the F9 key until the word "Memory" is displayed for
the F9 function key. Next, move the pencil position flashing dot to the
upper left hand corner of an imaginary box that would just hold the circle.
Now press the F8 key once. Next, move the pencil position to the lower left
hand corner of the imaginary box and press the F8 key again. Although nothing
appears to have happened, you have just stored the entire contents of the
imaginary box in the computer's memory. Now we can duplicate the circle any
place on the screen quite easily. Press the F10 key until the word "Recall"
appears on the display line. Now move the pencil to a new postion and press
the F8 key. The circle will appear again. Also notice that the pencil position
always winds up being in the upper left hand corner of the recalled image.
Therefore, take care that when you recall an image you have sufficient room
on the screen in the right hand and downward directions to accomodate the
whole image. If you don't have enough room,an error will result.
The RECALL function as discussed above can be modified by holding the
ALT key down and pressing the letter 'R' key. When you press ALT R you
will get a choice presented on the display line of five different types
of image recall and a selection can be made by pressing a number key from
1 to 5. Here's what the bottom line might look like after ATL R is pressed:
"Present RECALL= OR PSET=1 PRESET=2 XOR=3 OR=4 AND=5 Enter new number"
This means that any image recall done from memory or disk would be OR'ed
with any previous image on the screen. This is the default recall type and
is in effect when you run DIGIDRAW unless you change it by entering a new
number. After you press a number between 1 and 5, the program will resume
and any subsequent recalls made will be done with the new recall type.
-6-
A brief explanation of these five different recall types follows.
1. PSET When PSET is in effect, any recall of an image from memory or disk
will place the image on the screen and any image previously on the screen in
the area where the recall takes place is gone. This is analogous to a cut and
paste operation if you were using real pencil and paper. After the paste
operation is done, any image that might have been under the pasted image is
lost.
2. PRESET When PRESET is in effect, any recall of an image from memory or
disk will place the image on the screen as an exact negative of the original
stored image. So if you originally stored an all black box with a white bor-
der, a recall with PRESET in effect will produce an all white box with a
black border.
3. XOR When XOR is in effect, any recall of an image from memory or disk
will place the image on the screen opposite to the background color.
Take the following example. Suppose the screen was divided in two equal
parts in the vertical direction, the left side of the screen was all
white and right side was all black. Now let's say we recall an image from
disk which is a simple black box wtih a white border. If XOR is in effect,
we will get an interesting effect. Any portion of the box border which falls
in the white half of the screen will be drawn in black and any portion of the
box border which falls in the black half of the screen will be drawn in white.
4. OR This is the default type of recall in effect when DIGIDRAW starts.
This will place a recalled image on the screen and will preserve any image
that was already there. This is analogous to placing an image down on a
master drawing with a clear piece of paper. Not only can you see the new
image you just placed down, but you can also see what is under the new image.
5. AND This is used infrequently, and will transfer an image only if the
image already exists on the screen before the recall takes place.
Further discriptions of these functions can be found in the Basic
manual under the topic "PUT Statement (Graphics)"
ABORT UNWANTED FUNCTION:
Since most of the F4 thru F8 functions require at least 2 or more keystrokes
to draw something, a way of aborting an accidental or unwanted keystroke is
provided. This abort is the Esc or escape key.
This will tell the program to forget that any function F4-F8 was requested.
For example, suppose you wanted to draw an ellipse, and you had designated
the center and the 1st radius. In moving the pencil to the second radius you
find you really dont want that ellipse after all. To cancel the ellipse, just
press the Esc key.
CLEAR THE WHOLE SCREEN:
To clear the whole screen, hold the Alt key down and press the E key.
INSERT TEXT ON SCREEN:
To insert text any place on the screen, move the pencil to the area where
you want the text to start and press the Ins (insert) key. The flashing dot
will dissappear and you may then just type in your text. To terminate the
line and return to the normal program functions, press the Enter key You
will have to use the insert feature for each line of text desired.
The fashing dot (pencil) will reappear after the return is pressed
and will be loacted at the first character of text you inserted.
-7-
FINDING THE PENCIL POSITION:
Occasionally, you may lose track of the pencil position on the screen. To
find out where the pencil is located, hold the ATL key down and press the
letter 'P' key. The display line will be replaced by a message and the
co-ordinates of the pencil position. The co-ordinates will be two integer
values in the range of 0-639 for X and 0-191 for Y. The X value will be
given first and represents the vertical direction. The Y value will be the
second number displayed and represents the horizontal direction. The vertical
values increase as you move down the screen and the horizontal values increase
as you move left to right. Upper left hand corner of the screen = 0 ,0
Lower left hand corner of the screen = 0 ,191
Upper right hand corner of the screen= 639, 0
Lower right hand corner of the screen= 639 ,191
Suppose you pressed Alt P and you got the following message:
"Present pencil position = 319 96"
This would tell you that the pencil is located at the center of the screen.
--------------------- SUMMARY OF NON-DISPLAYED COMMANDS ------------------